import {HTTP} from "@/utils/http.ts";
import {useState, useEffect} from "react";

const useUserData = () => {
    const [userData, setUserData] = useState([]);

    useEffect(() => {
        async function getUserData() {
            const res = await HTTP.post('/get_user');
            console.log(res.data)
            setUserData(res.data);
        }

        getUserData();
    }, []);

    return {userData};

}

export default useUserData;